﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace HotelManagement
{
    public partial class BookingPreferenceOfRoom : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string desiredArrivalDate = Request.QueryString["desiredArrivalDate"];
            string arrivalTime = Request.QueryString["arrivalTime"];
            string desiredDepartDate = Request.QueryString["desiredDepartDate"];
            string departTime = Request.QueryString["departTime"];
            string numOfNight = Request.QueryString["numOfNight"];
            string numOfAdult = Request.QueryString["numOfAdult"];
            string numOfChildren = Request.QueryString["numOfChildren"];

            lblCheckInDate.Text = desiredArrivalDate;
            lblCheckInTime.Text = arrivalTime;
            lblCheckOutDate.Text = desiredDepartDate;
            lblCheckOutTime.Text = departTime;
            lblNight.Text = numOfNight;
            lblAdult.Text = numOfAdult;
            lblChildren.Text = numOfChildren;

        }

        protected void btnClear_Click(object sender, EventArgs e)
        {
            tbxRemarks.Text = "";

        }

        protected void btnContinue_Click(object sender, EventArgs e)
        {
            string bedType = ddlBedType.Text;
            string area = ddlArea.Text;

            string location = ddlLocation.Text;

            string querystring = "bedType=" + bedType;
            querystring += "&" + "area=" + area;
            querystring += "&" + "remarks=" + tbxRemarks.Text;
            querystring += "&" + "location=" + location;
            querystring += "&" + "desiredArrivalDate=" + lblCheckInDate.Text;
            querystring += "&" + "arrivalTime=" + lblCheckInTime.Text;
            querystring += "&" + "desiredDepartDate=" + lblCheckOutDate.Text;
            querystring += "&" + "departTime=" + lblCheckOutTime.Text;
            querystring += "&" + "numOfNight=" + lblNight.Text;
            querystring += "&" + "numOfAdult=" + lblAdult.Text;
            querystring += "&" + "numOfChildren=" + lblChildren.Text;


            Server.Transfer("CreateReservation.aspx?" + querystring);
        }

        protected void btnGoBack_Click(object sender, EventArgs e)
        {
            Server.Transfer("CheckAvailableRoom.aspx");
        }
    }
}